from sqlalchemy import Column, Integer, String, DECIMAL
from .Base import (Base)

class StudentCard(Base):
    __tablename__ = "student_card"

    id = Column(Integer, primary_key=True, index=True, autoincrement=True)
    student_id = Column(Integer, unique=True, nullable=False, index=True)  # 一对一
    card_number = Column(String(30), unique=True, nullable=False, index=True)
    balance = Column(DECIMAL(10, 2), default=0.00, nullable=False)
